package com.bytech.comment.biz.mapper.comment;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bytech.common.biz.entity.comment.Comment;
import com.bytech.common.biz.entity.comment.CommentQuery;
import com.bytech.common.biz.mapper.base.MyBatisBaseMapper;
import com.bytech.common.annotation.MyBatisRepository;

/**
 * @Author Zhao
 * @Create 2021-08-04
 */
@MyBatisRepository
public interface CommentMapper extends MyBatisBaseMapper<Comment> {

    /**
     * 获取按照 rootId 分组按照 createTime 倒序排序的前 pageSize 条数据
     */
    List<Comment> getCommentRepliesByRootId(@Param("rootIds") List<Long> rootIds, @Param("pageSize") Integer pageSize, @Param("pageNum") Integer pageNum);

    List<Comment> selectLatest(@Param("commentType") String commentType,@Param("limit") Integer limit);
}
